package com.personal.gateway.entity;

import com.personal.gateway.custom.customEnum.FlinkGateWayCommandEnum;
import lombok.Data;

import java.util.Date;

/**
 * @program: FlinkGateway
 * @description:
 * @author: yangliao
 * @create: 2021-08-23
 */
@Data
public class FlinkCommandHistory {

    private Integer id;
    private String gatewayNum;
    private Integer type;
    private String command = "";
    private String output = "";
    private String userName;
    private Integer delFlag;
    private Date updateTime;
    private Date createTime;

    private String typeStr;

    public String getTypeStr() {
        return FlinkGateWayCommandEnum.getName(type);
    }

    public FlinkCommandHistory() {
    }

    public FlinkCommandHistory(String gatewayNum, Integer type, String userName) {
        this.gatewayNum = gatewayNum;
        this.type = type;
        this.userName = userName;
    }

    public FlinkCommandHistory(String gatewayNum, String command, String output, Integer type, String userName) {
        this.gatewayNum = gatewayNum;
        this.command = command;
        this.output = output;
        this.type = type;
        this.userName = userName;
    }
}
